package org.feiye.studyday15;

public class PetDoctor {
	private String name;

	public PetDoctor() {
	}

	public PetDoctor(String name) {
		this.name = name;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public void cure(Pet pet) {
		System.out.println("宠物" + pet.name + "先叫一下、走动走动；");
		pet.shout();
		pet.run();
		if (pet.getHealth() < 50) {
			System.out.println(name + "给宠物" + pet.name + "量体温，开药");
			pet.setHealth(70);
			System.out.println(pet.name + "恢复健康！");
		} else {
			System.out.println("宠物" + pet.name + "很健康！");
		}
	}
}
